refactor(queue): consolidate bounded-concurrency helpers onto mapWithConcurrency#6721
refactor(queue): consolidate bounded-concurrency helpers onto mapWithConcurrency#6721pro3958 wants to merge 1 commit into
Conversation
…Concurrency focus-manifest-loader's mapWithConcurrencyLimit and patchless-secret-scan's mapPatchLessSecretScanFilesWithConcurrency each re-implemented the same worker-pool loop that src/queue/map-with-concurrency.ts already exports. Both now delegate to the canonical mapWithConcurrency, keeping their exported names and (items, limit, mapper) signatures so every existing call site compiles and behaves unchanged. No public behavior change; the two hand-duplicated loops that could silently drift are gone. Fixes JSONbored#6602
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
❌ 18 Tests Failed:
View the full list of 18 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-17 02:48:19 UTC
Review summary Nits — 5 non-blocking
CI checks failing
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
|
LoopOver is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-tests (2), validate-tests (4), validate-tests (5), validate-tests (1), validate-tests (3), validate-tests (6), validate-code)). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
What
src/queue/map-with-concurrency.tsis the canonical bounded-concurrency worker-pool helper, already reused acrosssrc/queue. Two files re-implemented the identical loop instead of importing it:src/signals/focus-manifest-loader.ts—mapWithConcurrencyLimitsrc/queue/patchless-secret-scan.ts—mapPatchLessSecretScanFilesWithConcurrencyBoth now delegate to
mapWithConcurrency, keeping their exported names and(items, limit, mapper)signatures unchanged, so every call site (including the two insrc/queue/processors.ts) compiles and behaves exactly as before.Why
Three copies of the same fan-out loop can silently drift. After this change
map-with-concurrency.tsis the single implementation undersrc/queue/andsrc/signals/; the other two just call into it.Scope
Pure internal consolidation — no change to public behavior, call signatures, or export names. The two delegating wrappers are already exercised transitively by their callers' existing suites (
test/unit/patchless-secret-scan.test.ts, the focus-manifest-loader / processors tests that drivemapWithConcurrencyLimit), so no new test is added.Fixes #6602